<html>
<head><meta charset="utf-8"><title>appreciation · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html">appreciation</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="179878742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/179878742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Avery Harnish <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#179878742">(Nov 04 2019 at 21:31)</a>:</h4>
<p>Just stumbled across rust-analyzer and WOW! Blazing fast!! This is going to make my life so much better when developing Rust, thanks so much to everybody working on this :)</p>



<a name="180599867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/180599867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#180599867">(Nov 13 2019 at 07:45)</a>:</h4>
<p>I must say, I am myself amazed at how far have we gone already. Certain things start to feel so natural, that I am forgetting all the complex machinery that powers the features :) Just now, I've mindlessly fixed a bug with a nested option because I've noticed a type hint:</p>
<p><a href="https://youtu.be/OlHZPglOtuQ" target="_blank" title="https://youtu.be/OlHZPglOtuQ">https://youtu.be/OlHZPglOtuQ</a></p>
<p>The way the hint changes when you add/remove <code>?</code> feels magical to me :)</p>
<div class="youtube-video message_inline_image"><a data-id="OlHZPglOtuQ" href="https://youtu.be/OlHZPglOtuQ" target="_blank" title="https://youtu.be/OlHZPglOtuQ"><img src="https://i.ytimg.com/vi/OlHZPglOtuQ/default.jpg"></a></div>



<a name="180623260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/180623260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#180623260">(Nov 13 2019 at 13:06)</a>:</h4>
<p>Maybe we should put together a video of all the cool features in ra</p>



<a name="180623365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/180623365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#180623365">(Nov 13 2019 at 13:08)</a>:</h4>
<p>I used to watch those live crate videos on youtube when I first got into rust... it would be cool to do something like that using rust-analyzer</p>



<a name="180623485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/180623485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#180623485">(Nov 13 2019 at 13:09)</a>:</h4>
<p>/me (looking up from 1.5k word unfinished blog-post about find usages): "that would be cool"</p>



<a name="180635418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/180635418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#180635418">(Nov 13 2019 at 15:12)</a>:</h4>
<p>I think it's an older feature, but I only recently found out about the semicolon insertion. I was scrolling around some large <code>if</code> to add a semicolon at the end, and it was already there. I thought I must have added it myself, then forgot about it.</p>



<a name="180636941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/180636941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#180636941">(Nov 13 2019 at 15:24)</a>:</h4>
<p>That, in fact, was on of the very first features implemented :)</p>



<a name="180656480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/180656480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#180656480">(Nov 13 2019 at 18:28)</a>:</h4>
<p>Just used it for the first time yesterday, and I was really impressed!</p>



<a name="180731018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/180731018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#180731018">(Nov 14 2019 at 13:40)</a>:</h4>
<blockquote>
<p>I must say, I am myself amazed at how far have we gone already. Certain things start to feel so natural, that I am forgetting all the complex machinery that powers the features :) Just now, I've mindlessly fixed a bug with a nested option because I've noticed a type hint:</p>
<p><a href="https://youtu.be/OlHZPglOtuQ" target="_blank" title="https://youtu.be/OlHZPglOtuQ">https://youtu.be/OlHZPglOtuQ</a></p>
<p>The way the hint changes when you add/remove <code>?</code> feels magical to me :)</p>
</blockquote>
<p>very cool</p>



<a name="180798997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/180798997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#180798997">(Nov 15 2019 at 03:22)</a>:</h4>
<p>Oh, I found that RA works in some rustc source code now!. The <code>goto-definition</code> is a godsend for reading rustc source code.</p>



<a name="181266066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/181266066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#181266066">(Nov 21 2019 at 00:51)</a>:</h4>
<p>I've been using ra for a while now with vim. I mostly tend to use it for completion, and it has been getting steadily better. Kudos to all! This is already a major improvement over the previous state</p>



<a name="185783578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/185783578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#185783578">(Jan 16 2020 at 03:59)</a>:</h4>
<p>I'm just coming back to this thread again to say how impressive it is that ra works on rustc and I can do things getting documentation, going to definition, finding references, etc on that huge code base</p>



<a name="185801673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/185801673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#185801673">(Jan 16 2020 at 10:25)</a>:</h4>
<p>rustc is peanuts. warp or lib p2p on the other hand.... :D</p>



<a name="185801698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/185801698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#185801698">(Jan 16 2020 at 10:25)</a>:</h4>
<p>btw, we recently landed a nice perf improvement for larger files: <a href="https://github.com/rust-analyzer/rust-analyzer/pull/2837" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/pull/2837">https://github.com/rust-analyzer/rust-analyzer/pull/2837</a></p>



<a name="188431099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188431099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188431099">(Feb 18 2020 at 08:15)</a>:</h4>
<p>Oh, I just tested the new <code>ra_lsp_server analysis-stats</code> command in RA source code, and found that we have only 6% (4%+2%) unknown types:</p>
<div class="codehilite"><pre><span></span>Total expressions: 134949
Expressions of unknown type: 5410 (4%)
Expressions of partially unknown type: 3830 (2%)
Type mismatches: 272
</pre></div>


<p>And here is the <code>analysis-stats</code> output from <strong>Feb 2019</strong>:</p>
<div class="codehilite"><pre><span></span>Total expressions: 49160
Expressions of unknown type: 8156 (16%)
Expressions of partially unknown type: 2432 (4%)
</pre></div>


<p>What  a big improvement ! <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="188432457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188432457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188432457">(Feb 18 2020 at 08:42)</a>:</h4>
<p>We're also 2.75x larger (total expressions)</p>



<a name="188433007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188433007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188433007">(Feb 18 2020 at 08:55)</a>:</h4>
<blockquote>
<p>We're also 2.75x larger (total expressions)</p>
</blockquote>
<p>probably a big part of that comes from macro expansions that we can handle now and couldn't last year</p>



<a name="188458895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188458895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188458895">(Feb 18 2020 at 15:14)</a>:</h4>
<p>Hey, rust-analyzer is in trending vs code extensions: <a href="https://marketplace.visualstudio.com/vscode" target="_blank" title="https://marketplace.visualstudio.com/vscode">https://marketplace.visualstudio.com/vscode</a></p>



<a name="188459075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188459075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188459075">(Feb 18 2020 at 15:17)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/3194" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/3194">Wow, even without a home page</a>...</p>



<a name="188459612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188459612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188459612">(Feb 18 2020 at 15:23)</a>:</h4>
<p>That is awesome</p>



<a name="188460153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188460153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188460153">(Feb 18 2020 at 15:28)</a>:</h4>
<p>also, 666 followers on twitter <span aria-label="smiling devil" class="emoji emoji-1f608" role="img" title="smiling devil">:smiling_devil:</span></p>



<a name="188461097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188461097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188461097">(Feb 18 2020 at 15:39)</a>:</h4>
<p>Don't forget to ask your relatives and friends to put 5 stars on the marketplace!</p>



<a name="188467722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188467722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188467722">(Feb 18 2020 at 16:45)</a>:</h4>
<p>Finally, I don't need to be reminded that syntax is a private field, thanks <span class="user-mention" data-user-id="231447">@Kirill Bulatov</span> !</p>
<p><a href="/user_uploads/4715/qoeKkdjW4P5ZD4HGU5QJTM6n/pasted_image.png" target="_blank" title="pasted_image.png">pasted image</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/qoeKkdjW4P5ZD4HGU5QJTM6n/pasted_image.png" target="_blank" title="pasted image"><img src="/user_uploads/4715/qoeKkdjW4P5ZD4HGU5QJTM6n/pasted_image.png"></a></div>



<a name="188569323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188569323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188569323">(Feb 19 2020 at 18:11)</a>:</h4>
<p>Actually, I think this is my first time coding in Rust with auto import (IntelliJ folks impled this just after I've left :) ), and the experience is really transformative.</p>



<a name="188581011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/188581011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kirill Bulatov <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#188581011">(Feb 19 2020 at 20:22)</a>:</h4>
<p>I would like to enhance it further, but need guidance.<br>
So after the maintenance week is over, let's go through the options.</p>



<a name="189678097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/189678097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#189678097">(Mar 04 2020 at 10:33)</a>:</h4>
<p>I am amazed by how things now just work with macros</p>
<p><a href="/user_uploads/4715/aEBSSvHrqR1vplpzyhAOqx8J/goto-macros.gif" target="_blank" title="goto-macros.gif">goto-macros.gif</a> </p>
<div class="message_inline_image"><a href="/user_uploads/4715/aEBSSvHrqR1vplpzyhAOqx8J/goto-macros.gif" target="_blank" title="goto-macros.gif"><img src="/user_uploads/4715/aEBSSvHrqR1vplpzyhAOqx8J/goto-macros.gif"></a></div><p>This jumps from macro to macro! Amazing work <span class="user-mention" data-user-id="216201">@Edwin Cheng</span> !</p>



<a name="189752197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/189752197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#189752197">(Mar 05 2020 at 01:04)</a>:</h4>
<p>Btw, this is a bit of meta note, but really love the fact that this thread exists at all, and I'm wondering if there are opportunities to do similar things in other corners of the rust community? What if there was a big "this awesome thing just happened" thread where people from any part of the community can post about cool accomplishments?</p>



<a name="191021588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191021588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191021588">(Mar 18 2020 at 18:18)</a>:</h4>
<p>I know this isn't news, but I haven't written much code lately and I just realized that <code>rust-analyzer</code> is starting to feel really polished now, with decent completion, go to definition and auto-import and related quick fixes.</p>



<a name="191021942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191021942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191021942">(Mar 18 2020 at 18:21)</a>:</h4>
<p>Yup. Also, ssr rocks!</p>



<a name="191021971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191021971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191021971">(Mar 18 2020 at 18:21)</a>:</h4>
<p>Just converted a bunch of functions to methods with it</p>



<a name="191022078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191022078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191022078">(Mar 18 2020 at 18:22)</a>:</h4>
<p>And this means that we can improve rust-analyzer itself faster ^^</p>



<a name="191024015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191024015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191024015">(Mar 18 2020 at 18:37)</a>:</h4>
<p>Semantic highlighting is what rocks for me!</p>



<a name="191024233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191024233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191024233">(Mar 18 2020 at 18:39)</a>:</h4>
<p>I tried it once, but it's too much of a hassle to use Insiders with that parameter <span aria-label="pensive" class="emoji emoji-1f614" role="img" title="pensive">:pensive:</span>.</p>



<a name="191025038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191025038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191025038">(Mar 18 2020 at 18:46)</a>:</h4>
<p>I added this to <code>.bashrc</code> </p>
<div class="codehilite"><pre><span></span> <span class="nb">alias</span> <span class="nv">code</span><span class="o">=</span><span class="s2">&quot;code-insiders --enable-proposed-api matklad.rust-analyzer&quot;</span>
</pre></div>


<p>Besides that migrated from <code>code</code> to <code>code-insiders</code> with the <a href="https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync" target="_blank" title="https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync">sync extension</a>, but there is some experimental work going on to <a href="https://code.visualstudio.com/docs/editor/settings-sync" target="_blank" title="https://code.visualstudio.com/docs/editor/settings-sync">add this feature to vscode from scratch</a>.</p>
<p>The most annoying thing still is that I cannot start vscode by clicking the ui icon. I always need <code>Ctrl+Shift+T</code> -&gt; <code>code</code> to do this.</p>



<a name="191025239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191025239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191025239">(Mar 18 2020 at 18:47)</a>:</h4>
<p>I think you can make a copy of the Code <code>.desktop</code> file and add that</p>



<a name="191026467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191026467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191026467">(Mar 18 2020 at 18:57)</a>:</h4>
<p>Hmm, yeah, that was not too annoying for me to spend another 5 minutes to setup that <code>.desktop</code> file now)</p>



<a name="191341728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191341728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191341728">(Mar 21 2020 at 11:41)</a>:</h4>
<p>It might be off topic to this thread, but I just found out our fake token used in Completion is <a href="https://github.com/rust-analyzer/rust-analyzer/blob/1878fbe8bd60c7f9e58fda6dc7788e5f44ad0f89/crates/ra_ide/src/completion/completion_context.rs#L75" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/1878fbe8bd60c7f9e58fda6dc7788e5f44ad0f89/crates/ra_ide/src/completion/completion_context.rs#L75"><code>intellijRulezz</code></a> <span aria-label="happy" class="emoji emoji-1f600" role="img" title="happy">:happy:</span></p>



<a name="191341791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191341791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191341791">(Mar 21 2020 at 11:42)</a>:</h4>
<p>First easter egg I found in this project !</p>



<a name="191342105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191342105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191342105">(Mar 21 2020 at 11:51)</a>:</h4>
<p>That's the secret sauce that makes completion especially delicious: <a href="https://github.com/JetBrains/intellij-community/blob/79e97242d9b7c52a1cb66e8a2f2343b91d47347f/platform/core-api/src/com/intellij/codeInsight/completion/CompletionUtilCore.java#L27" target="_blank" title="https://github.com/JetBrains/intellij-community/blob/79e97242d9b7c52a1cb66e8a2f2343b91d47347f/platform/core-api/src/com/intellij/codeInsight/completion/CompletionUtilCore.java#L27">https://github.com/JetBrains/intellij-community/blob/79e97242d9b7c52a1cb66e8a2f2343b91d47347f/platform/core-api/src/com/intellij/codeInsight/completion/CompletionUtilCore.java#L27</a></p>



<a name="191342318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/191342318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#191342318">(Mar 21 2020 at 11:57)</a>:</h4>
<p>We should submit a PR to <code>racer</code> to make it to the Standard for rust IDE !</p>



<a name="192250997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/192250997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kirill Bulatov <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#192250997">(Mar 30 2020 at 12:57)</a>:</h4>
<p>Just wanted to throw in my 5¢ and appreciate people doing the code reviews in the project. <br>
Thank you for helping to move everything forward.</p>



<a name="198128083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/198128083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#198128083">(May 19 2020 at 21:18)</a>:</h4>
<p>This was a WOW moment for me right now:</p>
<p><a href="/user_uploads/4715/NI8rcFuWxuh_giS9CVdxUMRk/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/NI8rcFuWxuh_giS9CVdxUMRk/image.png" title="image.png"><img src="/user_uploads/4715/NI8rcFuWxuh_giS9CVdxUMRk/image.png"></a></div>



<a name="198129802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/198129802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#198129802">(May 19 2020 at 21:33)</a>:</h4>
<p>not the double macro completions though <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="198130037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/198130037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#198130037">(May 19 2020 at 21:35)</a>:</h4>
<p>Lol yes. I looked into fixing that once, but I don't remember why I didn't... I <em>think</em> the issue is that we don't handle shadowing in <code>process_names_in_scope</code></p>



<a name="198130111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/198130111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#198130111">(May 19 2020 at 21:36)</a>:</h4>
<p>yeah, we also give double completions if you shadow local variables, I think</p>



<a name="198130157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/198130157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#198130157">(May 19 2020 at 21:36)</a>:</h4>
<p>And it's something along the lines of "macros are available both as "lexical"  macro-exported macros, as an items imported via prelude"</p>



<a name="199906746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/199906746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#199906746">(Jun 05 2020 at 17:08)</a>:</h4>
<p>Are we <code>async</code> now?</p>
<p><a href="/user_uploads/4715/ZeqLCpPE6t5MV71wRT5sxBmK/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/ZeqLCpPE6t5MV71wRT5sxBmK/image.png" title="image.png"><img src="/user_uploads/4715/ZeqLCpPE6t5MV71wRT5sxBmK/image.png"></a></div>



<a name="199906978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/199906978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#199906978">(Jun 05 2020 at 17:10)</a>:</h4>
<p>Hmm, interesting, maybe this is due to chalk update?</p>



<a name="199907021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/199907021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#199907021">(Jun 05 2020 at 17:10)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/pull/4689">https://github.com/rust-analyzer/rust-analyzer/pull/4689</a></p>



<a name="199907118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/199907118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#199907118">(Jun 05 2020 at 17:11)</a>:</h4>
<p><code>async { 42 }</code> is still inferred as <code>i32</code> though</p>



<a name="199907437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/199907437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#199907437">(Jun 05 2020 at 17:14)</a>:</h4>
<p>Anyway working with async functions was a huge pain, thanks <span class="user-mention" data-user-id="129457">@Florian Diebold</span> !</p>



<a name="219873877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219873877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219873877">(Dec 14 2020 at 17:26)</a>:</h4>
<p>I just noticed that "go to definition" works:</p>
<ul>
<li>on a proc macro</li>
<li>that's function-like (they weren't supported until recently)</li>
<li>in a parameter of a <code>println!()</code> invocation</li>
<li>and it actually navigates to the macro source code</li>
</ul>



<a name="219873965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219873965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219873965">(Dec 14 2020 at 17:27)</a>:</h4>
<p><a href="/user_uploads/4715/kQ85bLg6caD7BaxZIHvIKltP/image.png">image.png</a> </p>
<div class="message_inline_image"><a href="/user_uploads/4715/kQ85bLg6caD7BaxZIHvIKltP/image.png" title="image.png"><img src="/user_uploads/4715/kQ85bLg6caD7BaxZIHvIKltP/image.png"></a></div><p><a href="/user_uploads/4715/qhryamQ1SFE5tsxVHLbMcIxQ/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/qhryamQ1SFE5tsxVHLbMcIxQ/image.png" title="image.png"><img src="/user_uploads/4715/qhryamQ1SFE5tsxVHLbMcIxQ/image.png"></a></div>



<a name="219873992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219873992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219873992">(Dec 14 2020 at 17:27)</a>:</h4>
<p>I was blown away when I realized that completion <em>inside proc macro arguments</em> works now</p>



<a name="219874139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874139">(Dec 14 2020 at 17:28)</a>:</h4>
<p>Maybe not always :-)</p>
<p><a href="/user_uploads/4715/1LEEEGCCR0OTTdNfhRQmyoz6/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/1LEEEGCCR0OTTdNfhRQmyoz6/image.png" title="image.png"><img src="/user_uploads/4715/1LEEEGCCR0OTTdNfhRQmyoz6/image.png"></a></div>



<a name="219874168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874168">(Dec 14 2020 at 17:29)</a>:</h4>
<p>Should we really suggest <code>pub(crate)</code> there?</p>



<a name="219874200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874200">(Dec 14 2020 at 17:29)</a>:</h4>
<p>yeah, because that macro doesn't output anything that can be completed :)</p>



<a name="219874423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874423">(Dec 14 2020 at 17:30)</a>:</h4>
<blockquote>
<p>I was blown away when I realized that completion inside proc macro arguments works now</p>
</blockquote>
<p>wait wat?</p>



<a name="219874491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874491">(Dec 14 2020 at 17:31)</a>:</h4>
<p>What would be a nice example here?</p>



<a name="219874655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874655">(Dec 14 2020 at 17:32)</a>:</h4>
<p>like, here: <a href="https://twitter.com/sheevink/status/1336052790301376512">https://twitter.com/sheevink/status/1336052790301376512</a></p>
<div class="inline-preview-twitter"><div class="twitter-tweet"><a href="https://twitter.com/sheevink/status/1336052790301376512"><img class="twitter-avatar" src="https://pbs.twimg.com/profile_images/847921879218368513/mtSLf6K6_normal.jpg"></a><p>Completely ridiculous that autocompletion works here. This shouldn't work, it's a procedural macro!! <a href="https://t.co/TK1QDUkW2j">https://twitter.com/sheevink/status/1336052790301376512/photo/1</a></p><span>- _ZN5Jonas9Schievink (@sheevink)</span><div class="twitter-image"><a href="https://t.co/TK1QDUkW2j"><img src="https://pbs.twimg.com/media/EoqcpwMWEAAkr94.jpg:large"></a></div></div></div>



<a name="219874758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874758">(Dec 14 2020 at 17:33)</a>:</h4>
<p>Hm, do we build a TokenMap for proc macros already?</p>



<a name="219874764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874764">(Dec 14 2020 at 17:33)</a>:</h4>
<blockquote>
<p>Chief Curse Officer</p>
</blockquote>
<p>you mad man you really did it <span aria-label="joy" class="emoji emoji-1f602" role="img" title="joy">:joy:</span></p>



<a name="219874779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874779">(Dec 14 2020 at 17:33)</a>:</h4>
<p>This is "cheating" a bit since the input still parses as a valid expression – if it didn't the macro would just result in an error and not produce any completable output</p>



<a name="219874794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874794">(Dec 14 2020 at 17:33)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133169">matklad</span> <a href="#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/appreciation/near/219874758">said</a>:</p>
<blockquote>
<p>Hm, do we build a TokenMap for proc macros already?</p>
</blockquote>
<p>I don't think we do, no</p>



<a name="219874911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874911">(Dec 14 2020 at 17:34)</a>:</h4>
<p>I think this happened by accident when I fixed mapping macro-produced tokens back to the invocation</p>



<a name="219874954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874954">(Dec 14 2020 at 17:34)</a>:</h4>
<p>hmm, actually we should be building a TokenMap for the macro arguments</p>



<a name="219874958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874958">(Dec 14 2020 at 17:34)</a>:</h4>
<p>wait, no, i still don't understand</p>



<a name="219874980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219874980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219874980">(Dec 14 2020 at 17:35)</a>:</h4>
<p>Like, we even underline the <code>state</code> variable</p>



<a name="219875005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875005">(Dec 14 2020 at 17:35)</a>:</h4>
<p>and it highlights references and everything :D</p>



<a name="219875033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875033">(Dec 14 2020 at 17:35)</a>:</h4>
<p>I think renaming them might be broken, but still</p>



<a name="219875083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875083">(Dec 14 2020 at 17:35)</a>:</h4>
<p>goto definition works on <code>state</code>, <code>can1</code>, and <code>is_transmitter_idle</code> too</p>



<a name="219875148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875148">(Dec 14 2020 at 17:36)</a>:</h4>
<p>So we <em>should</em> compute token map then?</p>



<a name="219875202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875202">(Dec 14 2020 at 17:36)</a>:</h4>
<p>I think we do – I didn't touch that code though</p>



<a name="219875239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875239">(Dec 14 2020 at 17:36)</a>:</h4>
<p>since it's computed for macro <em>arguments</em></p>



<a name="219875398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875398">(Dec 14 2020 at 17:38)</a>:</h4>
<p>I mean, you need the mapping between the arguments and the output to do higlighing</p>



<a name="219875588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875588">(Dec 14 2020 at 17:39)</a>:</h4>
<p>This is utterly ridiculous</p>



<a name="219875600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875600">(Dec 14 2020 at 17:39)</a>:</h4>
<p>yeah, then we do compute that. for some reason it didn't work until recently though.</p>



<a name="219875672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875672">(Dec 14 2020 at 17:40)</a>:</h4>
<p>ah I think I just confused it with <code>Shift</code>, which is only used by MBE</p>



<a name="219875763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875763">(Dec 14 2020 at 17:40)</a>:</h4>
<p>Yeah, I don't think you have analogue of <code>Shift</code> for proc macros</p>



<a name="219875774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875774">(Dec 14 2020 at 17:40)</a>:</h4>
<p>at least, not that easily</p>



<a name="219875822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875822">(Dec 14 2020 at 17:41)</a>:</h4>
<p>we need <code>Shift</code> to find tokens from the right hand side of mbe</p>



<a name="219875869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219875869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219875869">(Dec 14 2020 at 17:41)</a>:</h4>
<p>and proc-macro doesn't really have an rhs, it manufactures tokens out of thin air</p>



<a name="219876305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876305">(Dec 14 2020 at 17:44)</a>:</h4>
<p>So is it ignoring the fact that it's a proc macro invocation and parsing the arguments as Rust expressions?</p>



<a name="219876348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876348">(Dec 14 2020 at 17:45)</a>:</h4>
<p>No, it looks at the output</p>



<a name="219876378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876378">(Dec 14 2020 at 17:45)</a>:</h4>
<p><span class="user-mention" data-user-id="203546">@Laurențiu Nicola</span> no, this is the real thing</p>



<a name="219876506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876506">(Dec 14 2020 at 17:46)</a>:</h4>
<p>hmm, this is confusing: <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_expand/src/db.rs#L155">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_expand/src/db.rs#L155</a></p>



<a name="219876533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876533">(Dec 14 2020 at 17:46)</a>:</h4>
<p>I think that's the TokenMap for the <code>macro_rules!</code> "arguments"?</p>



<a name="219876548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876548">(Dec 14 2020 at 17:46)</a>:</h4>
<p>not the <em>invocation</em> arguments</p>



<a name="219876608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876608">(Dec 14 2020 at 17:47)</a>:</h4>
<p>yup</p>



<a name="219876653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876653">(Dec 14 2020 at 17:47)</a>:</h4>
<p>it maps <code>tt</code> tokens from the template to syntax nodes in the original file</p>



<a name="219876689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876689">(Dec 14 2020 at 17:47)</a>:</h4>
<p>So in</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">_x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">42</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="n">println</span><span class="o">!</span><span class="p">(</span><span class="s">"{}"</span><span class="p">,</span><span class="w"> </span><span class="n">procmacro</span>::<span class="n">say</span><span class="o">!</span><span class="p">(</span><span class="n">_x</span><span class="p">));</span><span class="w"></span>
</code></pre></div>
<p>go to definition on <code>_x</code> will only work if it appears in the output of the proc macro (because it doesn't)?</p>



<a name="219876759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/219876759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#219876759">(Dec 14 2020 at 17:48)</a>:</h4>
<p>yeah, it should</p>



<a name="220120019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/220120019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#220120019">(Dec 16 2020 at 14:15)</a>:</h4>
<p>It's incredible that one can just "generate <code>From</code> impl for enum variant"!</p>



<a name="220120082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/220120082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#220120082">(Dec 16 2020 at 14:16)</a>:</h4>
<p>(took me only three enums to recall that this exists)</p>



<a name="225185884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/225185884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#225185884">(Feb 04 2021 at 16:37)</a>:</h4>
<p>hey, we ended up on HN: <a href="https://news.ycombinator.com/item?id=26026309">https://news.ycombinator.com/item?id=26026309</a></p>



<a name="234703842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/234703842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#234703842">(Apr 15 2021 at 15:59)</a>:</h4>
<p>We've got mentioned in <a href="https://security.googleblog.com/2021/04/rust-in-linux-kernel.html">https://security.googleblog.com/2021/04/rust-in-linux-kernel.html</a> !</p>



<a name="240869632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/appreciation/near/240869632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/appreciation.html#240869632">(May 31 2021 at 20:42)</a>:</h4>
<p>oh wow</p>
<p><a href="/user_uploads/4715/J9ORwn10_iAXiHoEVEJh4K0Z/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/J9ORwn10_iAXiHoEVEJh4K0Z/image.png" title="image.png"><img src="/user_uploads/4715/J9ORwn10_iAXiHoEVEJh4K0Z/image.png"></a></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>